local addonName = "CrowdControl"
local Plugin = TargetAlert:NewModule(addonName)
local BS = AceLibrary("Babble-Spell-2.2")
local Aura = AceLibrary("SpecialEvents-Aura-2.0")

local ccdebuffs = {
	[BS["Polymorph: Pig"]] = true,
	[BS["Polymorph: Turtle"]] = true,
	[BS["Banish"]] = true,
	[BS["Polymorph"]] = true,
	[BS["Sap"]] = true,
	[BS["Seduction"]] = true,
	[BS["Hibernate"]] = true,
	[BS["Shackle Undead"]] = true,
	[BS["Freezing Trap Effect"]] = true,
}

function Plugin:OnEnable()
end

function Plugin:OnDisable()

end

function Plugin:TargetHasDebuff(debuffName)
  return Aura:UnitHasDebuff("target", debuffName)
end

function Plugin:OnTargetChanged()
	--[[local debuffName = "Polymorph: Pig"
	if self:TargetHasDebuff( debuffName ) then
		self:Print("Target it poly/pig")
	end
	self:Print("CrowdControlPlugin:OnTargetChanged")]]
	for k, v in pairs(ccdebuffs) do
		if self:TargetHasDebuff( k ) then
			self:Print("Target it crowd controlled")
		end
	end
end

